Demographics, medication use, and admission characteristics of patients hospitalized with diabetes in Ontario, Canada: A retrospective cohort study

Background In Canada, one in seven adults has diabetes (i.e., 2.3 million) and the lifetime risk of developing diabetes is approximately 30% by age 65. Although 30% of patients admitted to the hospital have diabetes, data from inpatient hospitalizations for patients with diabetes are lacking, both in Canada and globally. Objective To validate International Classification of Diseases 10th edition Canadian version (ICD-10-CA) codes for the identification of patients with diabetes, to create a multicenter database of patients with diabetes hospitalized under internal medicine in Ontario, and to determine their baseline characteristics, medication use, and admission characteristics. Study design We created a database of people who had diabetes and were hospitalized between 2010 and 2020 at 8 hospitals in Ontario that were part of the General Medicine Inpatient Initiative (GEMINI) hospital data-sharing network. Patients who had diabetes were identified using chart review, based upon either (i) a previous physician diagnosis of diabetes, (ii) a recorded hemoglobin A1c ≥ 6.5% or (iii) outpatient prescription of a diabetes medication preceding the hospitalization. The test characteristics of ICD-10-CA codes for diabetes were evaluated. We compared baseline demographics, medication use and hospitalization details among patients with and without diabetes. For hospitalization details, we collected information on the admission diagnosis, comorbidity index, length of stay, receipt of ICU-level care, and inpatient mortality. Results There were 384,588 admissions within the total study cohort, of which 118,987 (30.9%) had an ICD-10-CA diagnosis code of diabetes (E10.x, E11.x, E13.x, E14.x). The sensitivity and specificity of ICD-10-CA diagnostic codes was 95.9% and 98.8%, respectively. Most patients with an ICD-10-CA code for diabetes had a code for type 2 diabetes (93.9%) and a code for type 1 diabetes was rare (6.1%). The mean age was 66.4 years for patients without diabetes and 71.3 years for those with an ICD-10-CA diagnosis code for diabetes. Patients with diabetes had a higher prevalence of hypertension (64% vs. 37.9%), coronary artery disease (28.7% vs. 15.3%), heart failure (24.5% vs. 12.1%) and renal failure (33.8% vs. 17.3%) in comparison to those without diabetes. The most prevalent diabetes medications received in hospital were metformin (43%), DPP4 inhibitors (22.7%) and sulfonylureas (18.8%). The most common reason for admission among patients with diabetes was heart failure (9.0%), and among patients without diabetes was pneumonia (7.8%). Median length of stay was longer for patients with diabetes (5.5 vs. 4.5 days) and in-hospital mortality was similar between groups (6.8% with diabetes vs. 6.5% without diabetes). Importance Diabetes is one of the most prevalent chronic medical conditions, affecting roughly one third of all patients hospitalized on an internal medicine ward and is associated with other comorbidities and longer hospital stays. ICD-10-CA codes were highly accurate in identifying patients with diabetes. The development of an inpatient cohort will allow for further study of in-hospital practices and outcomes among patients with diabetes.


Introduction
Over 400 million people around the world have diabetes mellitus [1].In Canada, one in seven adults has diabetes (i.e., 2.3 million) and the risk of developing diabetes by age 65 is roughly 30% [1].Patients with diabetes have an increased risk of hospitalization [2].Despite this, most large administrative databases (e.g., Institute of Clinical Evaluative Sciences (ICES), Denmark, Sweden, US insurance claims) do not capture most inpatient data [3,4].One reason this problem exists is because hospitals use different electronic medical record systems, and thus extracting data from the inpatient setting cannot be easily automated.
The limited data from the inpatient setting means little is known about what occurs when people with diabetes are hospitalized, and without this data it is challenging to develop strategies to improve inpatient care.This is reflected in international guidelines (e.g., National Institute for Health and Care Excellence [NICE], Diabetes Canada, American Diabetes Association) that often cite low-quality evidence for inpatient management strategies [5][6][7].For example, it is well established that sodium-glucose cotransporter 2 (SGLT2) inhibitors and glucagon-like peptide 1 (GLP1) receptor agonists reduce the risk of cardiovascular events and potentially all-cause mortality, but these medications are seldom started prior to discharge from hospital [8].As another example, severe hypoglycemia can be life-threatening, but Competing interests: MF was a consultant for ProofDx, a start-up company creating a point of care diagnostic test for COVID-19.MF is an advisor for Signal1, a start-up company deploying machine learned models to improve inpatient care.TBS was a steering committee member of the Amgenfinanced GALACTIC-HF trial, of the Boehringer Ingelheim financed SHARP3 trial, of "LUX-Dx TRENDS Evaluates Diagnostics Sensors in Heart Failure Patients Receiving Boston Scientific's Investigational ICM System" trial; advisory board: Amgen, CSL Seqirus and GSK; chief investigator of the Sanofi Pasteur financed "NUDGE-FLU", "DANFLU-1", and "DANFLU-2" trials; speaker honorarium: Bayer, Novartis, Sanofi Pasteur, GE healthcare and GSK; consultant appointments: Novo Nordisk, IQVIA and Parexel; and research grants: GE Healthcare, AstraZeneca, Novo Nordisk and Sanofi Pasteur.Outside of the submitted work, AV is a part-time employee of Ontario Health and a co-inventor of an AI-based early warning system for patient deterioration that was acquired by the start-up company Signal1.FR is a part-time employee of Ontario Health.mechanisms to identify patients at highest risk during their hospitalization are lacking [9].The absence of inpatient data means that many of the decisions we make are not supported by high quality evidence, and until inpatient data are readily available and accessible, both basic and more complex inpatient clinical questions cannot be answered.This is particularly important given that over 30% of patients admitted to the general internal medicine ward have a history of diabetes [10].
The objective of our study was to evaluate the accuracy of inpatient International Classification of Diseases 10 th edition Canadian version (ICD-10-CA) codes for the diagnosis of diabetes, to create a multicenter database of patients with diabetes hospitalized under internal medicine in Ontario, and to determine their baseline characteristics, medication use, and admission characteristics.

Study design
We conducted a cohort study of adults admitted to the inpatient general internal medicine service between January 1, 2010 and June 1, 2020 at 8 hospitals in Ontario, Canada that are part of the General Medicine Inpatient Initiative (GEMINI) database [10].The GEMINI database includes administrative data (at both the patient and provider level) and clinical data for all patients admitted to, or discharged from, the general internal medicine units at the affiliated sites [10].

Cohort definition and follow up
We included all consecutive adult patients (� 18 years old) admitted to or discharged from the inpatient general internal medical service or medical-surgical intensive care unit (ICU) between January 1, 2010 and June 1, 2020.The general internal medicine service accounts for up to 40% of emergency admissions to hospital and nearly 25% of hospital bed-days.It is the largest single group of hospitalized patients and includes most patients with medical indications for hospitalization [10].Patients were followed from the date of hospital admission to the first of either hospital discharge or death.

Data sources
Administrative and clinical data were extracted from each patient's electronic medical record through methods previously described by the GEMINI research program [11].Patients' electronic medical records were linked to the following administrative datasets: the Canadian Institute for Health Information (CIHI) Discharge Abstract Database (DAD) and the National Ambulatory Care Reporting System (NACRS).Linkage through these databases provides information on their past medical history pre-dating their hospitalization as well as administrative data for their current hospitalization.Specifically, CIHI and NACRS provides ICD-10-CA codes which can be utilized to understand both their past medical history and the diagnoses for their current hospitalization.All data were accessed through the GEMINI database between November 30, 2020, and May 15, 2023.

ICD-10-CA code abstraction
During each hospital admission, diagnoses are submitted to the DAD within CIHI, including the most responsible diagnosis (MRDx), comorbidity diagnoses, secondary diagnoses, admitting diagnoses and service transfer diagnosis [12,13].Each diagnosis is encoded with an ICD-10-CA code [14].The MRDx is the one diagnosis that is most responsible for the patient's stay in hospital; if there is more than one condition, it is the diagnosis that contributed to the greatest proportion of the length of stay [13].Comorbidity diagnoses are separated into pre-admit diagnoses (existing prior to hospitalization), and post-admit diagnoses (arose after admission and during hospitalization) [13].Secondary diagnoses are diagnoses or conditions for which the patient may or may not have received treatment and do not meet any of the criteria for significance (i.e., require treatment beyond maintenance of the pre-existing condition, increase the length of stay by at least 24 hours, or significantly affect the treatment received) [13].The admitting diagnosis is an optional diagnosis or condition that can be assigned if the reason for admission differs from the most responsible diagnosis [13].Finally, the service transfer diagnosis is the diagnostic code associated with a patient transfer between services, or between levels of care (e.g., transfer to alternate level of care [ALC]) [13].

Clinical data abstraction
Other details obtained from the current hospitalization included demographic information (age, sex, proxies for socioeconomic status [e.g., neighbourhood income quintile, place of residence prior to hospitalization]), length of stay, receipt of ICU level care, and inpatient mortality.Clinical data from the hospitalization was available within GEMINI and directly extracted from the patient's electronic medical record through a data transfer.Clinical data included their past medical history (using Clinical Classification Software Refined [CCSR] codes, e.g., hypertension, coronary artery disease), diabetes severity (e.g., hemoglobin A1c), diabetes complications (e.g., nephropathy), inpatient medications (e.g., insulin, metformin), laboratory values (e.g., creatinine), imaging results, vital signs, and physician orders.The accuracy of these data relative to manual chart review by a trained chart abstractor have previously been evaluated and all data fields have an accuracy of above 99% [11].The S1 Appendix provides further details on the criteria used to identify these prior diagnoses.Medications received and laboratory values obtained prior to the time of presentation to the hospital (which mainly occurred through the emergency department) were not available within GEMINI and thus not included in the overall analysis, but manually chart-abstracted for a subset of patients.

Manual chart review
In addition to the administrative and clinical data automatically captured from the GEMINI database, charts were also manually reviewed by trained abstractors to obtain other datapoints that were not available within GEMINI.We performed a manual chart review of 650 randomly selected charts, including 500 that were reviewed for the presence or absence of an ICD-10-CA code for diabetes and 650 that were evaluated for a glucose � 11.1 mmol/L.The admission note, discharge summary, lab values and pharmacy notes were manually reviewed to determine whether the patient had a diagnosis of diabetes.A patient was considered to have diabetes if they met any one of the following criteria: (1) a physician diagnosis of diabetes in their admission note or discharge note, (2) prescription of a home diabetes medication (S1 Appendix) in their admission or pharmacy note, or (3) a recorded hemoglobin A1c value of 6.5% or greater in the admission note or laboratory values.This served as the ground truth definition of diabetes within our study to which other criteria were compared.Additional data not available within GEMINI and collected through manual chart review included body mass index (BMI), smoking status, pre-hospitalization medications, and discharge medications.

Study objectives
The primary objective of our study was to evaluate the accuracy of inpatient ICD-10-CA codes for the diagnosis of diabetes with the goal of creating a multicentre database of patients with diabetes who were hospitalized in Ontario.Secondary objectives included describing the baseline characteristics, medication use, and reason for hospitalization among adults with diabetes.Secondary outcomes included the length of hospital stay, ICU utilization and inpatient mortality.

Statistical analysis
We calculated descriptive statistics for demographic variables (e.g., age, sex, income quintile), comorbidities, inpatient medications and baseline laboratory values.We calculated standardized differences to compare the frequency of comorbidities (e.g., coronary artery disease, congestive heart failure and cerebrovascular disease), medication use (metformin, a dipeptidyl-peptidase 4 [DPP4] inhibitors and SGLT2 inhibitors), most responsible discharge diagnosis and laboratory values, between patients with and without diabetes.A standardized difference of 0.1 or less indicates balance between groups [15].We calculated test characteristics using the following formulae: sensitivity = (true positives/[true positives + false negatives]), specificity = (true negatives/[true negatives + false positives]), positive predictive value = (true positives/[true positive + false positives]), and negative predictive value = (true negatives/[true negatives + false negatives]).The test criteria was an ICD-10-CA code, which was compared to the ground truth criteria of a physician diagnosis of diabetes, receipt of a diabetes medication prior to hospitalization or hemoglobin A1c � 6.5%, as detailed above.R version 4.1.3was utilized for all analyses [16].

Results
We identified 384,588 patient admissions to one of 8 hospitals in Ontario between the years of 2010 and 2020 (Table 1).In comparison to manual chart review ICD-10-CA codes for diabetes typically had sensitivity and specificity greater than 90%, though this varied depending on the position of the ICD-10-CA code (Table 2).When an ICD-10-CA code for diabetes in only the MRDx position was utilized, the sensitivity was 80.3% and the specificity was 100%.In contrast, when an ICD-10-CA code at any diagnostic position was used, the specificity remained high at 98.8% and the sensitivity increased to 95.9%.As noted, a person was considered to have diabetes on manual chart review if their chart contained either a physician diagnosis of diabetes, a hemoglobin A1c value equal to or greater than 6.5%, or a prescription for a diabetes medication prior to hospitalization.Hemoglobin A1c measurements were completed during the hospitalization in 12.9% of all patients within the cohort, and 21.3% of patients with an ICD-10-CA code for diabetes.Among patients with diabetes, 75.5% received any diabetes medication while in hospital.Based on the sensitivity and specificity noted above, data missingness and feasibility of deployment, the definition of diabetes utilized to create the inpatient cohort was an ICD-10-CA code for diabetes mellitus in any diagnostic position (S1 Appendix).
Medication use.During their hospitalization, 43% of patients with diabetes received metformin, 22.7% received a DPP4 inhibitor, 18.8% received a sulfonylurea, 18.1% received insulin, 1.9% received an SGLT2 inhibitor and 0.1% received a GLP1 receptor agonist (Table 1).Empagliflozin was the most common SGLT2 inhibitor, accounting for 59.3% of all SGLT2 inhibitors prescribed.Admission characteristics.Among patients hospitalized with a prior diagnosis of diabetes, heart failure was the most common admission diagnosis (9.0%), followed by pneumonia (7.8%) and complication of diabetes (7.5%) (Table 3).Among patients without a prior diagnosis of diabetes, the most common reason for admission was pneumonia (7.8%), followed by bacterial infections (6.2%), and urinary tract infections (5.1%).
Outcomes.The median length of stay was 5.5 (Interquartile Range [IQR] 2.7-10.7)days for patients with diabetes in comparison to 4.5 (IQR 2.1-9.2) days for patients without diabetes (Table 3).The proportion of patients with diabetes admitted to the ICU during their hospitalization was 13.1% in comparison to 11.6% among patients without diabetes.Inpatient mortality was 6.8% for patients with diabetes versus 6.5% among patients without diabetes.

Data from manual chart abstraction
Within the subset of diabetes patients for which manual chart abstraction was performed, rates of medication use prior to hospitalization were as follows: insulin 50%, metformin 42%, DPP4 inhibitor 27%, sulfonylurea 14%, SGLT2 inhibitor 5.1% and GLP1 receptor agonist <1% (Table 4).Rates of medication prescription at discharge were as follows: insulin 57%, metformin 44%, DPP4 inhibitor 28%, sulfonylurea 12%, SGLT2 inhibitor 3.5%, and GLP1 receptor agonist <1%.Sulfonylureas and SGLT2 inhibitors were the two medications most frequently discontinued during hospitalization.Among all patients taking a sulfonylurea prior to hospitalization, 19% had the sulfonylurea discontinued and not restarted at the time of discharge.Among all patients taking an SGLT2 inhibitor prior to hospitalization, 32% had the SGLT2 inhibitor discontinued and not restarted at the time of discharge.Within the abstracted chart dataset, it was identified that 6.5% of patients with diabetes were diagnosed with diabetes during the hospitalization (S1 Appendix).BMI among patients with a weight and height measurement during the hospitalization was 29.4 kg/m2 among patients with diabetes and 26.0 kg/m2 for patients without diabetes (S1 Appendix).

Discussion
In this study of 8 hospitals and over 380,000 total hospital admissions, there were 118,987 admissions among patients with diabetes.ICD-10-CA codes for diabetes had a sensitivity and specificity greater than 90% measured against manual chart review.Patients with diabetes accounted for 30.9% of all hospital admissions to internal medicine.The most frequent reason for admission among patients with diabetes was heart failure, followed by pneumonia.The average length of stay among patients with diabetes was 5.5 days, and 6.8% died in hospital.This large multicentre inpatient diabetes database will allow for the evaluation of multiple components of diabetes management in hospital.
Patients with diabetes in this cohort were commonly admitted for conditions related to cardiovascular, renal and infectious diseases.These diseases are likely to be both directly and indirectly related to their diabetes.This aligns with prior literature showing that admissions for skin and soft tissue infection, urinary tract infection, stroke, and electrolyte abnormalities were higher in patients with diabetes compared to those without diabetes [17].Two new classes of medications (SGLT2 inhibitors and GLP1 receptor agonists) reduce the risk of cardiovascular and renal events in patients with diabetes [8,18].Use of these medications was exceedingly rare in our cohort which we suspect is due to several reasons.First, many of the admissions in this study occurred prior to the availability of these medications in Ontario.Second, the uptake of these medications into clinical practice has been slow, especially in the inpatient setting.For example, in a large US population-based study, only a small portion of eligible patients had been started on these newer medications [19].Ensuring that patients are on optimal guideline-directed pharmacologic therapy may be an important focus for physicians and hospital groups to improve patient care, symptom burden, and frequency of hospitalization.This inpatient diabetes database will help to better understand safety and adverse effects of new pharmacotherapies in real world practice.
Prior studies have utilized diagnostic codes, and in particular, ICD-9 or ICD-10 codes, to identify patients with diabetes [20,21].We found that ICD-10-CA codes for diabetes as the most responsible diagnosis had a specificity exceeding 99%, but a sensitivity of 80%.In contrast, ICD-10-CA diagnosis codes for diabetes at any position (i.e., not just the most responsible diagnosis code) had a sensitivity of 96% and specificity of 99% for the diagnosis of diabetes, measured against the gold-standard of manual chart review.Our results suggest that evaluating for an ICD-10-CA code for diabetes at any diagnosis position for an inpatient admission People with diabetes are three times more likely to be hospitalized compared to age-matched adults who do not have diabetes [17].By creating a centralized database to house hospitalization data, GEMINI-DM will allow us to gain insight and understanding into the quality of the care provided in inpatient centers as well as clinical outcomes following hospitalization for patients with diabetes.As we gather more information about these inpatient hospitalizations, we can identify gaps and improve the care of this patient population.To measure pre-and post-hospital events, GEMINI-DM will be linked to ICES, which contains longitudinal health-related data (e.g., anonymous patient records, population-based health surveys, and clinical data) for all residents of Ontario.Thus, the GEMINI-DM cohort linked with ICES will allow us to understand how treatment decisions can affect a person's risk of hospitalization and how a hospitalization can impact what happens after a patient is discharged home.These rich data will be able to answer a wide range of research questions including, but not limited to, quality of inpatient care of people with diabetes, clinical effectiveness of treatment strategies implemented during a hospitalization, and evaluation of clinical prediction tools to prevent adverse events during an inpatient hospitalization.
Our study has several limitations.First, our cohort primarily included adults hospitalized under the internal medicine service, and therefore may not reflect characteristics of inpatients with diabetes admitted to pediatric, surgical or psychiatric units.Second, there are several rare conditions (e.g., iron deficiency, hemolysis) which can falsely elevate or lower the hemoglobin A1c value.However, because these conditions are relatively rare, we do not believe this would significantly affect the classification of patients as with or without diabetes according to hemoglobin A1c value.Third, the reason for prescribing a medication was not available for all patients.Some patients may have received metformin, an SGLT2 inhibitor or GLP1 receptor agonist for reasons other than diabetes (such as prediabetes, PCOS, heart failure and obesity, respectively).However, during the study time period, neither SGLT2 inhibitors nor GLP1 receptor agonists were approved for patients without diabetes, and this is therefore likely to be rare.Similarly, given the age distribution of patients in our study, use of metformin for PCOS is expected to be low.Fourth, identification of whether patients were diagnosed with diabetes during or prior to the hospitalization was based on chart review and only available for a subsample of the entire cohort.We therefore could not stratify results by whether patients had a new or existing diagnosis of diabetes.Finally, our cohort primarily included large hospitals in urban settings and thus our results may not generalize to rural hospitals.

Conclusion
In summary, patients with diabetes represent 30% of all admissions to internal medicine, have a longer length of stay, and have high rates of ICU admission and inpatient mortality.Cardiovascular, infectious, and renal complications of diabetes are the most frequent reasons for admission, and many patients are not taking therapies shown to decrease the risk of admission for these complications.Future research should focus on preventing and managing complications among patients with diabetes and increasing utilization of the most effective pharmacologic and non-pharmacologic interventions.

Table 2 . Test characteristics of ICD-10-CA codes using CIHI categories for diagnosis of diabetes mellitus.
International Classification of Diseases 10 th edition Canadian version, CIHI: Canadian Institute for Health Information, MRDx: Most responsible diagnosis.Test characteristics were calculated using the test criteria listed in column 1 compared to the gold standard definition for diabetes, which was patient chart review with any of (1) a physician diagnosis of diabetes in their admission or discharge note, (2) prescription of a diabetes medication in their admission or pharmacy note, or (3) a recorded hemoglobin A1c value greater than or equal to 6.5% in the admission note or laboratory values.ICD-10-CA codes utilized were E10.x for Type 1 Diabetes and E11.x, E13.x and E14.x for Type 2 Diabetes.https://doi.org/10.1371/journal.pone.0307581.t002

Table 4 . Diabetes medications prescribed prior to hospitalization and at the time of discharge according to man- ual chart review.
most responsible diagnosis, comorbidity diagnosis, secondary diagnosis and admitting diagnosis) is a highly sensitive and specific method for identifying patients with diabetes in health administrative databases.
a : Home medication denotes patient was prescribed the medication prior to hospitalization.b: Discharge medication indicates the patient was recommended to continue taking this medication after discharge from the hospital.DPP4: Dipeptidyl-peptidase 4 inhibitor, GLP-1: Glucagon-like peptide 1 receptor agonist, SGLT2: Sodium-glucose cotransporter 2 inhibitor.Cells with <5 observations were labelled as such to protect potentially identifiable patient information.https://doi.org/10.1371/journal.pone.0307581.t004(